package com.szxb.facebus;

import android.graphics.Color;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import android.view.View;
import android.widget.FrameLayout;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

/**
 * 作者：Tangren on 2018-12-18
 * 包名：com.szxb.facebus
 * 邮箱：996489865@qq.com
 * TODO:一句话描述
 */
public class TestActivity extends AppCompatActivity {
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        if (Build.VERSION.SDK_INT > 21) {
            int option = View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
                    | View.SYSTEM_UI_FLAG_LAYOUT_STABLE
                    | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
                    | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
                    | View.SYSTEM_UI_FLAG_FULLSCREEN
                    | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN;

            getWindow().getDecorView().setSystemUiVisibility(option);
            getWindow().setNavigationBarColor(Color.TRANSPARENT);
        }
        super.onCreate(savedInstanceState);
        setContentView(R.layout.test);

        final FrameLayout texture=findViewById(R.id.texture);
        new Handler().postDelayed(new Runnable() {
            @Override
            public void run() {
                Log.d("TestActivity",
                        "onCreate(TestActivity.java:37)"+texture.getHeight());
                Log.d("TestActivity",
                        "onCreate(TestActivity.java:40)"+texture.getWidth());
            }
        },2000);

    }
}
